package com.cda.mall.dao;

import com.cda.mall.entity.ShoppingCart;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cda.mall.entity.ShoppingCartVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 购物车  Mapper 接口
 * </p>
 *
 * @author cda
 * @since 2021-11-13
 */
@Repository
public interface ShoppingCartMapper extends BaseMapper<ShoppingCart> {

    public int insertCart(ShoppingCart cart);

    public List<ShoppingCartVO> selectShopcartByUserId(int userId);

    public int updateCartnumByCartid(@Param("cartId") int cartId,
                                     @Param("cartNum") int cartNum);

    //1,8
    public List<ShoppingCartVO> selectShopcartByCids(List<Integer> cids);
}
